Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors encountered when utilizing a master-replica database setup #1813

Merged
merged 6 commits into from
May 4, 2020

Conversation

DavisRayM
Copy link
Contributor

@DavisRayM DavisRayM commented Apr 17, 2020

Changes / Features implemented

  • Fix an AttributeError raised when retrieving an XForm from the list viewset using form_pk.
  • Handle a DoesNotExist error raised when retrieving owner team.
  • Handle cases where an organization does not have an Owners team.

Steps taken to verify this change does what is intended

Side effects of implementing this change

Closes #1809
Additional Information: DoesNotExist error, Attribute error

ivermac
ivermac previously approved these changes Apr 17, 2020
Copy link
Contributor

@ivermac ivermac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@DavisRayM DavisRayM changed the title Fix 500 errors raised when utilizing a master-replica database setup [WIP] Fix 500 errors raised when utilizing a master-replica database setup Apr 17, 2020
@DavisRayM DavisRayM changed the title [WIP] Fix 500 errors raised when utilizing a master-replica database setup Fix 500 errors raised when utilizing a master-replica database setup Apr 17, 2020
ivermac
ivermac previously approved these changes Apr 20, 2020
@DavisRayM DavisRayM changed the title Fix 500 errors raised when utilizing a master-replica database setup Fix errors encountered when utilizing a master-replica database setup Apr 20, 2020
Retrieve organization owner team from the master database if unable to
retrieve the team the first time
Modify Enketo submission and formList urls by changing the name of the
"form_pk" arguement to "xform_pk"
@DavisRayM DavisRayM force-pushed the fix-500-caused-by-db-desync branch 5 times, most recently from acdaec9 to 949a9a0 Compare April 30, 2020 08:45
@DavisRayM DavisRayM force-pushed the fix-500-caused-by-db-desync branch 3 times, most recently from b320b64 to ac58a7a Compare May 4, 2020 07:55
Rename function get_organization_owners_team to
get_or_create_organization_owners_team
@DavisRayM DavisRayM force-pushed the fix-500-caused-by-db-desync branch from ac58a7a to cac43d8 Compare May 4, 2020 08:08
@ukanga ukanga merged commit 24b743f into master May 4, 2020
@ukanga ukanga deleted the fix-500-caused-by-db-desync branch May 4, 2020 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'NoneType' object has no attribute 'user' when accessing formList using enketo url
3 participants